home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / Sync_Wait.man < prev    next >
Encoding:
Text File  |  1990-09-13  |  2.6 KB  |  69 lines

  1.  
  2.  
  3.  
  4. Sync_Wait             C Library Procedures              Sync_Wait
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NNAAMMEE
  11.      Sync_Wait - wait on a monitor condition variable
  12.  
  13. SSYYNNOOPPSSIISS
  14.      ##iinncclluuddee <<ssyynncc..hh>>
  15.      SSyynncc__WWaaiitt(_c_o_n_d_i_t_i_o_n_P_t_r, _w_a_k_e_I_f_S_i_g_n_a_l)
  16.  
  17. AARRGGUUMMEENNTTSS
  18.      Sync_Condition   *_c_o_n_d_i_t_i_o_n_P_t_r   (in)      Address of a con-
  19.                                                 dition   variable
  20.                                                 to    distinguish
  21.                                                 waiting   process
  22.                                                 for later notifi-
  23.                                                 cation.
  24.  
  25.      Boolean          _w_a_k_e_I_f_S_i_g_n_a_l    (in)      This parameter is
  26.                                                 currently
  27.                                                 ignored.
  28.  
  29. _________________________________________________________________
  30.  
  31. DDEESSCCRRIIPPTTIIOONN
  32.      SSyynncc__WWaaiitt allows a process using a monitor  to  wait  for  a
  33.      particular condition.  This routine can only be called while
  34.      a monitor lock is aquired because it is only safe  to  check
  35.      global  state  while  in the monitor. This call releases the
  36.      monitor lock and makes the process sleep on  the  condition.
  37.      Other  processes  waiting  on  the  monitor lock will become
  38.      runnable.  The process remains asleep until some other  pro-
  39.      cess  invokes  SSyynncc__BBrrooaaddccaasstt  with the same condition vari-
  40.      able.
  41.  
  42.      Because broadcast semantics are used,  it  is  possible  for
  43.      spurious wakeups to occur if multiple processes are awaiting
  44.      the same condition.  Additionally, all processes waiting  on
  45.      *_c_o_n_d_i_t_i_o_n_P_t_r  will  be awakened simultaneously and may exe-
  46.      cute in any  order.   For  these  reasons,  when  a  process
  47.      resumes  execution  it  may  find  that the condition it was
  48.      awaiting is no longer valid.  In this case, it  should  call
  49.      SSyynncc__WWaaiitt again.
  50.  
  51.      When the process awakens due to event  notification  through
  52.      SSyynncc__BBrrooaaddccaasstt, SSUUCCCCEESSSS is returned.
  53.  
  54. SSEEEE AALLSSOO
  55.      Sync, Sync_Broadcast, Sig_Send
  56.  
  57. KKEEYYWWOORRDDSS
  58.      synchronization, wait, block, signal, process, event
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. Sprite v.1.0      Printed:  September 13, 1990                  1
  66.  
  67.  
  68.  
  69.